// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdRole
 */
public class AdRoleDaoImpl
    extends org.tinaelle.server.domain.AdRoleDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdRoleDao#toAdRoleDTO(org.tinaelle.server.domain.AdRole)
     */
    public org.tinaelle.common.dto.AdRoleDTO toAdRoleDTO(final org.tinaelle.server.domain.AdRole entity)
    {
        return super.toAdRoleDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdRole loadAdRoleFromAdRoleDTO(org.tinaelle.common.dto.AdRoleDTO adRoleDTO)
    {
        org.tinaelle.server.domain.AdRole adRole = this.load(adRoleDTO.getAdRoleId());
        if (adRole == null)
        {
            adRole = org.tinaelle.server.domain.AdRole.Factory.newInstance();
        }
        return adRole;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdRoleDao#adRoleDTOToEntity(org.tinaelle.common.dto.AdRoleDTO)
     */
    public org.tinaelle.server.domain.AdRole adRoleDTOToEntity(org.tinaelle.common.dto.AdRoleDTO adRoleDTO)
    {
        org.tinaelle.server.domain.AdRole entity = this.loadAdRoleFromAdRoleDTO(adRoleDTO);
        this.adRoleDTOToEntity(adRoleDTO, entity, true);
        return entity;
    }
}